package com.example.websocket.aop.controller;

import com.example.websocket.aop.config.annotation.MyAopAnnotation;
import com.example.websocket.websocket.entity.UserChat;
import com.example.websocket.websocket.mybatis.dao.UserChatDAO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AopController {

    @RequestMapping("/hello")
    @MyAopAnnotation("MyAopAnnotation1")
    public String sayHello() {
        System.out.println(StringUtils.isNotBlank(""));
        System.out.println("hello");
        return "hello";
    }

    @RequestMapping("/hello1")
    @MyAopAnnotation("MyAopAnnotation2")
    public Integer sayHello1() {
        System.out.println("hello1");
        return 1/0;
    }
}
